# 接收用户输入的系数
a1 = float(input("请输入 a1: "))
b1 = float(input("请输入 b1: "))
c1 = float(input("请输入 c1: "))
a2 = float(input("请输入 a2: "))
b2 = float(input("请输入 b2: "))
c2 = float(input("请输入 c2: "))

# 计算行列式 Δ, Δx, Δy
delta = a1 * b2 - a2 * b1
delta_x = c1 * b2 - c2 * b1
delta_y = a1 * c2 - a2 * c1

# 判断并求解
if delta == 0:
    if delta_x == 0 and delta_y == 0:
        print("无数解")
    else:
        print("无解")
else:
    x = delta_x / delta
    y = delta_y / delta
    print(f"x = {x:.2f}, y = {y:.2f}")